
const { ccclass, property } = cc._decorator;

@ccclass("WechatConfig")
export class WechatConfig {

    @property()
    public appID: string = "";

    @property({ type: [cc.String] })
    bannerId: string[] = [];

    @property()
    _isAlignTop: boolean = false;
    @property({ displayName: "Top", tooltip: "广告条顶部对齐" })
    public get isAlignTop() {
        return this._isAlignTop;
    }
    public set isAlignTop(value: boolean) {
        this._isAlignTop = value;
        if (this._isAlignTop) {
            this._isAlignBottom = false;
        }
    }

    @property()
    _isAlignBottom: boolean = true;
    @property({ displayName: "Bottom", tooltip: "广告条底部对齐" })
    public get isAlignBottom() {
        return this._isAlignBottom;
    }
    public set isAlignBottom(value: boolean) {
        this._isAlignBottom = value;
        if (this._isAlignBottom) {
            this._isAlignTop = false;
        }
    }

    @property({ tooltip: "广告条偏移量" })
    public offset: cc.Vec2 = cc.Vec2.ZERO;
}

@ccclass("OppoConfig")
export class OppoConfig {
    @property()
    public appID: string = "";

    @property({ type: [cc.String] })
    bannerId: string[] = [];

    @property({ tooltip: "插屏广告ID" })
    insertId: string = "";

    @property({ tooltip: "激励视频广告ID" })
    videoId: string = "";

    @property({tooltip:"原生广告ID"})
    nativeId:string = "";
}

@ccclass("CommonConfig")
export default class CommonConfig {

    @property({ type: WechatConfig, tooltip: "微信小游戏配置" })
    wechatconfig: WechatConfig = null;

    @property({ type: OppoConfig, tooltip: "OPPO小游戏配置" })
    oppoconfig: OppoConfig = null;
}


